package com.crawler.harbour.model;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * <p>
 * 船期
 * </p>
 *
 * @author hhd
 * @since 2018-03-28
 */
@TableName("t_shipment_new")
public class ShipmentNew extends Model<ShipmentNew> {

    private static final long serialVersionUID = 1L;
    /**
     * id
     */
    @TableId(value = "id",type = IdType.INPUT)
    private String id;
    /**
     * 码头
     */
    private String portNo;
    /**
     * 船名
     */
    private String shipName;
    /**
     * 船名中文
     */
    private String shipCnName;
    /**
     * 航次
     */
    private String shipTimer;
    /**
     * 进口船期
     */
    private String sailingDate;
    /**
     * 可进场时间
     */
    private String intoDate;
    /**
     * 截箱时间
     */
    private String offDate;
    /**
     * 预泊时间@JsonProperty("berthDate")
     */
    @JsonIgnore
    private String berthDate;
    /**
     * 预离时间@JsonProperty("leaveDate")
     */
    @JsonIgnore
    private String leaveDate;
    /**
     * 截关时间（海关截单时间）
     */
    private String cutOffDate;
    /**
     * 堆存天数
     */
    @TableField(exist=false)
    @JsonIgnore
	private String storageDays;
    /**
     * 截提单时间
     */
    @JsonIgnore
    private String offLadingDate;
    @JsonIgnore
    @TableField("create_time")
    private Date createTime;
    /**
     * 状态   Y已离港 U为开户 E已开户
     */
    @JsonIgnore
    @TableField("status")
    private String status;
    /**
     * 1进口航次2出口航次
     */
    @JsonIgnore
    @TableField("type")
    private Integer type;
    /**
     * 码头中文名
     */
    private String wharfName;
    /**
     * 船公司
     */
    @JsonIgnore
    @TableField("liner")
    private String liner;
    /**
     * 船代
     */
    @JsonIgnore
    @TableField("agent")
    private String agent;
    /**
     * 进出口航线
     */
    @JsonIgnore
    @TableField("svc_name")
    private String svcName;
    /**
     * 熏蒸进重截止时间
     */
    @JsonIgnore
    @TableField("xz_cut_date")
    private String xzCutDate;

    
    
	public String getShipName() {
		return shipName;
	}

	public void setShipName(String shipName) {
		this.shipName = shipName;
	}

	public String getShipCnName() {
		return shipCnName;
	}

	public void setShipCnName(String shipCnName) {
		this.shipCnName = shipCnName;
	}

	public String getShipTimer() {
		return shipTimer;
	}

	public void setShipTimer(String shipTimer) {
		this.shipTimer = shipTimer;
	}

	public String getSailingDate() {
		return sailingDate;
	}

	public void setSailingDate(String sailingDate) {
		this.sailingDate = sailingDate;
	}

	public String getIntoDate() {
		return intoDate;
	}

	public void setIntoDate(String intoDate) {
		this.intoDate = intoDate;
	}

	public String getOffDate() {
		return offDate;
	}

	public void setOffDate(String offDate) {
		this.offDate = offDate;
	}

	public String getBerthDate() {
		return berthDate;
	}

	public void setBerthDate(String berthDate) {
		this.berthDate = berthDate;
	}

	public String getLeaveDate() {
		return leaveDate;
	}

	public void setLeaveDate(String leaveDate) {
		this.leaveDate = leaveDate;
	}

	public String getCutOffDate() {
		return cutOffDate;
	}

	public void setCutOffDate(String cutOffDate) {
		this.cutOffDate = cutOffDate;
	}

	public String getOffLadingDate() {
		return offLadingDate;
	}

	public void setOffLadingDate(String offLadingDate) {
		this.offLadingDate = offLadingDate;
	}

	public String getWharfName() {
		return wharfName;
	}

	public void setWharfName(String wharfName) {
		this.wharfName = wharfName;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

    public String getLiner() {
        return liner;
    }

    public void setLiner(String liner) {
        this.liner = liner;
    }

    public String getAgent() {
        return agent;
    }

    public void setAgent(String agent) {
        this.agent = agent;
    }

    public String getSvcName() {
        return svcName;
    }

    public void setSvcName(String svcName) {
        this.svcName = svcName;
    }

    public String getXzCutDate() {
        return xzCutDate;
    }

    public void setXzCutDate(String xzCutDate) {
        this.xzCutDate = xzCutDate;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    public String getPortNo() {
        return portNo;
    }

    public void setPortNo(String portNo) {
        this.portNo = portNo;
    }

    public String getStorageDays() {
		return storageDays;
	}

	public void setStorageDays(String storageDays) {
		this.storageDays = storageDays;
	}

	public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    /**
     * 船期
     * @return
     */
   /* public String getSailingTime() {
        if(this.getType() == null || this.getType() == 0) {
          if(this.getCkChuanqi() !=null) {
            return this.getCkChuanqi();
          }else {
            return this.getJkChuanqi();
          }
        }else if(this.getType() == 1) {
          return this.getJkChuanqi();
        }else {
          return this.getCkChuanqi();
        }
    }*/
/*    @JsonIgnore
    public String getCrawlDate() {
    	if(this.createTime!=null) {
    		SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
    		return formatter.format(createTime);
    	}
    	return "";
    }
*/    
	@Override
    public String toString() {
        return "Shipment{" +
        ", wharfName=" + wharfName +
        ", liner=" + liner +
        ", agent=" + agent +
        ", svc" + svcName +
        ", xzCutDate=" + xzCutDate +
        "}";
    }
}
